/*
 * Copyright (c) 2024-2024 Kaihong Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef SLE_LINKLAYER_SERVICE_H
#define SLE_LINKLAYER_SERVICE_H

#include <stdint.h>
#include "sle_linklayer.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SVC_TYPE_LEN    1
#define SVC_LEN_LEN     1
#define SVC_PAYLOAD_LEN_LEN     2
// typedef enum {
//     SLE_CMD_DATA_MODE_TLV    = 0b00,     /* 当前不支持 */
//     SLE_CMD_DATA_MODE_JSON   = 0b01,
// } SleCmdDataFormat;

// typedef enum {
//     SLE_OPTYPE_PUT = 0x00,
//     SLE_OPTYPE_GET = 0x01,
//     SLE_OPTYPE_RPT = 0x02,
// } SleOpType;


int32_t SleLinkLayerProcessRspData(uint16_t connId, const uint8_t *buff, uint32_t len, SleLinkLayerEncryptType encryptType,
    uint8_t **outBuff, uint32_t *outLen);

int32_t DecodeCmdSleData(const uint8_t *buff, uint32_t len, SleCmdParam *cmdParam);

#ifdef __cplusplus
}
#endif

#endif /* SLE_LINKLAYER_SERVICE_H */